import { Form, Radio } from "antd";
import { useState } from "react";
import store from "./store";
const StypeOne = () => {
  const { data, setData } = store.useContainer();
  const importChange = (val: 'file' | 'text') => {
    setData(pre => {
      return {
        ...pre,
        importType: val
      }
    })
  }
  return (
    <>
      <Form.Item label='导入作品'>
        <Radio.Group
          value={data.importType}
          onChange={(e) => { importChange(e.target.value) }}
          options={
            [
              {
                label: '文件导入',
                value: 'file'
              },
              {
                label: '文字输入',
                value: 'text'
              }
            ]
          } ></Radio.Group>

      </Form.Item >
    </>
  )
}

export default StypeOne;